package com.iot.comprehensive.face.controller;

import com.iot.comprehensive.face.service.UserService;
import com.iot.comprehensive.face.utils.Result;
import com.iot.comprehensive.face.utils.ResultCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 朱泽玉
 * @Create 2021/6/25 10:21
 * @Description
 * @Modified By:
 */
@RestController
@RequestMapping("/sys")
@Api(tags = "系统操作", protocols = "http,https")
@ApiResponses({
        @ApiResponse(code = 200, message = "登录成功"),
        @ApiResponse(code = 300, message = "出现错误"),
        @ApiResponse(code = 301, message = "无权限(未认证)")
})
public class SysController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    @ResponseBody
    public Result queryUserById(@PathVariable("id") String id) {
        try {
            return new Result(ResultCode.SUCCESS, id);
        }catch(Exception e){
            return new Result(ResultCode.FAIL);
        }

    }


}
